package edu.sctu.practice.class02.shilaihong.text.text02;

/**
 * Created by admin on 2015/10/12.
 */
public class Vehicle {
    //定义数据类型
    public double speed;
    private double size;

    public Vehicle(double speed, double size) {
        this.speed = speed;
        this.size = size;
    }

    public void run() {
        System.out.println("I'm moving:");

    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSize(double size) {
        this.size = size;
    }

    public double getSize() {
        return size;
    }

    public double speedUp() {
        return (speed + 12);
    }


    public double speedDown() {
        return (speed - 15);
    }
}
